package com.example.sentineldemo.handler;

import com.alibaba.csp.sentinel.slots.block.BlockException;

/**
 * @author wangjinlong
 * @date 2022/2/11 10:03
 */
public class CommonBackHandler {

    public static String handleBlockException(String storeId, BlockException e){
        return "限流或降级熔断 - " + storeId;
    }

    public static String handleAllException(String storeId, Throwable e){
        return "其他异常熔断  - " + storeId;
    }

    public static String handleBlockException2(BlockException e){
        return "限流或降级熔断2";
    }

    public static String handleAllException2(Throwable e){
        return "其他异常熔断2";
    }

}
